<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>水仙花数</title>
</head>
<script type="text/javascript">
var i=prompt("请输入一个三位数");
var a=i%10;  //取个位数
var b=parseInt(i/10)%10; //取十位数
var c=parseInt(i/100);  //取百位数
if(i==Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3))
{
	alert("yes");
}
else
{
	alert("no");
}
</script>
<body>
</body>
</html>
